<?php
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\SoftDeletes;
use Traits\HasUuid;

class OrganizationModel extends Model
{
    use HasFactory, HasUuid, SoftDeletes;

    protected $table = 'organizations';

    protected $fillable = [];

    protected $hidden = ["deleted_at"];

    public function user(): BelongsToMany
    {
        return $this->belongsToMany(UserModel::class, 'ws_organization_users',
            'organization_id', 'user_id');
    }
}
